import { PureComponent } from 'react'
import {Link} from 'react-router-dom'
import HeaderMenu from './menu'

class Header extends PureComponent {
    render() {

        const {appName,currentUser} = this.props
        return (
            <nav className='navbar navbar-light'>
                <div className='container'>
                    {/* 右边 */}
                    <Link to={'/'} className='navbar-brand' >
                        {appName}
                    </Link>
                    {/* 左边 */}
                    <HeaderMenu currentUser={currentUser} />
                </div>
            </nav>
        )

    }
}

export default Header;
